import request from '../utils/request'

export const CreateCompany_tree = (data) => {
  return request('/api/company_tree', {
    method: 'post', 
    data
  })
}
export const delete_tree = (companyCode) => {
  return request(`/api/company_tree/${companyCode}`, {
    method: 'delete', 
  })
}

//调整公司排序
export const UpdateCompanySort = (params) => {
  return request(`/api/company/tree/order_change`, {
    method: 'put',
    params
  })
}

//修改机构名称
export const EditCompanyName = (params) => {
  return request(`/api/company_tree/name_change`, {
    method: 'put',
    params
  })
}

//批量调整
export const BatchTransfer = (data) => {
  return request(`/api/company_tree/struct_change`, {
    method: 'put',
    data
  })
}